package cn.itsource.order.controller;

import cn.itsource.order.dto.PayDto;
import cn.itsource.order.service.IOrderAdoptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
@Slf4j
public class OrderAdoptController {

    @Autowired
    private IOrderAdoptService orderAdoptService;

    /**
     * 提交订单
     * @param payDto
     * @return
     */
    @PostMapping("/adoptOrder/submitOrder")
    public String submitOrder(@RequestBody PayDto payDto){

        return  orderAdoptService.submitOrder(payDto);
    }


}
